﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace RestaurantBooker.Controls
{
    public class BitmapButton : Button
    {
        public BitmapButton()
        {            
            this.DefaultStyleKey = typeof(BitmapButton);
        }

        /// <summary>
        /// The <see cref="Stretch" /> dependency property's name.
        /// </summary>
        public const string StretchPropertyName = "Stretch";

        /// <summary>
        /// Gets or sets the value of the <see cref="Stretch" />
        /// property. This is a dependency property.
        /// </summary>
        public Stretch Stretch
        {
            get
            {
                return (Stretch)GetValue(StretchProperty);
            }
            set
            {
                SetValue(StretchProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="Stretch" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty StretchProperty = DependencyProperty.Register(
            StretchPropertyName,
            typeof(Stretch),
            typeof(BitmapButton),
            new PropertyMetadata(Stretch.None));

        /// <summary>
        /// The <see cref="NormalBitmap" /> dependency property's name.
        /// </summary>
        public const string NormalBitmapPropertyName = "NormalBitmap";

        /// <summary>
        /// Gets or sets the value of the <see cref="NormalBitmap" />
        /// property. This is a dependency property.
        /// </summary>
        public ImageSource NormalBitmap
        {
            get
            {
                return (ImageSource)GetValue(NormalBitmapProperty);
            }
            set
            {
                SetValue(NormalBitmapProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="NormalBitmap" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty NormalBitmapProperty = DependencyProperty.Register(
            NormalBitmapPropertyName,
            typeof(ImageSource),
            typeof(BitmapButton),
            new PropertyMetadata(null));



        ////////////////////////// MouseOver


        /// <summary>
        /// The <see cref="MouseOverBitmap" /> dependency property's name.
        /// </summary>
        public const string MouseOverBitmapPropertyName = "MouseOverBitmap";

        /// <summary>
        /// Gets or sets the value of the <see cref="MouseOverBitmap" />
        /// property. This is a dependency property.
        /// </summary>
        public ImageSource MouseOverBitmap
        {
            get
            {
                return (ImageSource)GetValue(MouseOverBitmapProperty);
            }
            set
            {
                SetValue(MouseOverBitmapProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="MouseOverBitmap" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty MouseOverBitmapProperty = DependencyProperty.Register(
            MouseOverBitmapPropertyName,
            typeof(ImageSource),
            typeof(BitmapButton),
            new PropertyMetadata(null));

        //// Pressed

        /// <summary>
        /// The <see cref="PressedBitmap" /> dependency property's name.
        /// </summary>
        public const string PressedBitmapPropertyName = "PressedBitmap";

        /// <summary>
        /// Gets or sets the value of the <see cref="PressedBitmap" />
        /// property. This is a dependency property.
        /// </summary>
        public ImageSource PressedBitmap
        {
            get
            {
                return (ImageSource)GetValue(PressedBitmapProperty);
            }
            set
            {
                SetValue(PressedBitmapProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="PressedBitmap" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty PressedBitmapProperty = DependencyProperty.Register(
            PressedBitmapPropertyName,
            typeof(ImageSource),
            typeof(BitmapButton),
            new PropertyMetadata(null));


        /// Disabled
       
        /// <summary>
        /// The <see cref="DisabledBitmap" /> dependency property's name.
        /// </summary>
        public const string DisabledBitmapPropertyName = "DisabledBitmap";

        /// <summary>
        /// Gets or sets the value of the <see cref="DisabledBitmap" />
        /// property. This is a dependency property.
        /// </summary>
        public ImageSource DisabledBitmap
        {
            get
            {
                return (ImageSource)GetValue(DisabledBitmapProperty);
            }
            set
            {
                SetValue(DisabledBitmapProperty, value);
            }
        }

        /// <summary>
        /// Identifies the <see cref="DisabledBitmap" /> dependency property.
        /// </summary>
        public static readonly DependencyProperty DisabledBitmapProperty = DependencyProperty.Register(
            DisabledBitmapPropertyName,
            typeof(ImageSource),
            typeof(BitmapButton),
            new PropertyMetadata(null));


    }
}
